#!/bin/bash
MYUID=`id -u 2> /dev/null`
if [ ! -z "$MYUID" ]; then
    if [ $MYUID != 0 ]; then
        echo "You need root privileges to run this script.";
        exit 1
    fi
else
    echo "Could not detect UID";
    exit 1
fi

# ------------------------------
# Define some global variables.
# ------------------------------
tmprootdir="$(dirname $0)"
echo ${tmprootdir} | grep '^/' >/dev/null 2>&1
if [ X"$?" == X"0" ]; then
    export ROOTDIR="${tmprootdir}"
else
    export ROOTDIR="$(pwd)/$(dirname $0)"
fi

cd ${ROOTDIR}

export CORE_DIR="${ROOTDIR}/core"
. ${CORE_DIR}/backup_file

export FUNCTIONS_DIR="${ROOTDIR}/functions"

. ${FUNCTIONS_DIR}/make_env.sh

. ${FUNCTIONS_DIR}/development_Kit.sh
. ${FUNCTIONS_DIR}/mysql.sh
. ${FUNCTIONS_DIR}/apache.sh
. ${FUNCTIONS_DIR}/php.sh
. ${FUNCTIONS_DIR}/apache_php_config.sh
. ${FUNCTIONS_DIR}/memcached.sh

. ${FUNCTIONS_DIR}/php_extension.sh

#. ${FUNCTIONS_DIR}/VirtualHost.sh


exit 1